package org.fast.test.aspect;

import org.fast.framework.annotation.Aspect;
import org.fast.framework.annotation.Controller;
import org.fast.framework.proxy.AspectProxy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.lang.reflect.Method;

/**
 * Created by Hone on 2016/12/4.
 */
@Aspect(Controller.class)
public class ControllerAspect extends AspectProxy {

    private static final Logger LOGGER = LoggerFactory.getLogger(ControllerAspect.class);

    @Override
    public void before(Class<?> clazz, Method method, Object[] params) throws Throwable {
        LOGGER.info("方法执行之前");
    }

    @Override
    public void after(Class<?> clazz, Method method, Object[] params, Object result) throws Throwable {
        LOGGER.info("方法执行之后");
    }
}
